'use strict';
const fs = require('fs');
const path = require('path');
const mkdirsSync = function(dirname = '', mode = null) {
        if (fs.existsSync(dirname)) {
                return true;
        } else {
                if (mkdirsSync(path.dirname(dirname), mode)) {
                        fs.mkdirSync(dirname, mode);
                        return true;
                } else {
                        return false;
                }
        }
}

module.exports = { 
        mkdirsSync 
};